﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace Maticsoft.Web
{
    public partial class UserPoints : PageBaseMember
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Check();
            UserLeft1.FlagId = "4";
            if (!IsPostBack)
            {
                BindList();
            }
        }

        protected void BindList( )
        {
            string strWhere = "userId=" + UserId;
            string strOrderBy = "CreditId desc";
            int count = 0;
            BLL.CreditHistory creBLL = new BLL.CreditHistory();
            count = creBLL.GetRecordCount(strWhere);
            AspNetPager1.RecordCount = count;
            DataSet ds = creBLL.GetListByPage(strWhere, strOrderBy, AspNetPager1.StartRecordIndex, AspNetPager1.EndRecordIndex);
            Repeater1.DataSource = ds.Tables[0].DefaultView;
            Repeater1.DataBind();
        }

        protected void AspNetPager1_PageChanging( object src, Wuqi.Webdiyer.PageChangingEventArgs e )
        {
            AspNetPager1.CurrentPageIndex = e.NewPageIndex;
            BindList();
        }
    }
}